﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics.Contracts;

namespace FazaDemo.PL.Mapping
{
    [ContractClassFor(typeof(IContainerElementMapper<,>))]
    abstract class ContainerElementMapperContract<TFrom, TTo> : IContainerElementMapper<TFrom, TTo>
    {
        public IEnumerable<TTo> MapFrom(IEnumerable<TFrom> from)
        {
            Contract.Requires(from != null);
            Contract.Requires(from.Any());
            Contract.Ensures(Contract.Result<IEnumerable<TTo>>() != null);
            Contract.Ensures(Contract.Result<IEnumerable<TTo>>().Any());
            return default(IEnumerable<TTo>);
        }
    }
}
